<?php
/*
 * notes:
 *   this tpl master submodule form
 *
 * if clone as another one, below tags need to be replace to ur target module tag
 * "final_cloth_form"
*/
$moduleName   = $invokeParams['moduleName'];
$subItemModuleName   = $invokeParams['subItemModuleName'];
$formDialogId = WacModuleHelper::getFormDialogId($invokeParams['subItemModuleName']);
$formId       = WacModuleHelper::getFormId($invokeParams['subItemModuleName']);

echo "<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"/css/backend/{$invokeParams['subItemModuleName']}/".WacControlTableType::$moduleForm.".css\" />\n";
echo "<script type=\"text/javascript\" src=\"/js/backend/{$invokeParams['subItemModuleName']}/".WacControlTableType::$moduleSubForm.".js\">";
echo "</script>";
echo "<div id=\"".$formDialogId."\" class=\"ui-widget\" style=\"display: none\" >\n\n";

?>
<!-- form, begin-->
<form action="#" name="<?php echo $formId;?>" id="<?php echo $formId;?>" method="post" class="wacFormA">
    <div class="wacFormFirstCol" style="margin-right: 1px; width: 350px;">
        <h3>
            <?php
            echo $invokeParams['caption'];
            ?>
        </h3>
        <div class="wacFormContentA">
            <div class="wacFormRow">
                <div class="wacFormItemLeft">生产单号</div>
                <div class="wacFormItemRight">
                    <div id="<?php echo $subItemModuleName ?>_production_order_code"></div>
                </div>
                <div class="wacFormClear"></div>
            </div>
            <div class="wacFormRow">
                <div class="wacFormItemLeft ">成品单号</div>
                <div class="wacFormItemRight">
                    <div id="<?php echo $subItemModuleName ?>_final_cloth_form_code"></div>
                </div>
                <div class="wacFormClear"></div>
            </div>
            <div class="wacFormRow">
                <div class="wacFormItemLeft">生产厂</div>
                <div class="wacFormItemRight">
                    <div id="<?php echo $subItemModuleName ?>_supplier_name"></div>
                </div>
                <div class="wacFormClear"></div>
            </div>
            <div class="wacFormRow">
                <div class="wacFormItemLeft">货物单位</div>
                <div class="wacFormItemRight">
                    <select name="goods_number_unit_code" id="<?php echo $subItemModuleName ?>_goods_number_unit_code" style="width: 195px">
                        <option></option>
                    </select>
                </div>
                <div class="wacFormClear"></div>
            </div>
            <div class="wacFormRow">
                <div class="wacFormItemLeft">货物名称</div>
                <div class="wacFormItemRight">
                    <div id="<?php echo $subItemModuleName ?>_goods_id"></div>
                </div>
                <div class="wacFormClear"></div>
            </div>
            <div class="wacFormRow">
                <div class="wacFormItemLeft">材料</div>
                <div class="wacFormItemRight">
                    <div id="<?php echo $subItemModuleName ?>_raw_material_id"></div>
                </div>
                <div class="wacFormClear"></div>
            </div>
            <div class="wacFormRow">
                <div class="wacFormItemLeft">颜色</div>
                <div class="wacFormItemRight">
                    <div id="<?php echo $subItemModuleName ?>_color_id"></div>
                </div>
                <div class="wacFormClear"></div>
            </div>
        </div>
    </div>
    <div class="wacFormSecondCol">
        <h3>&nbsp;</h3>
        <div class="wacFormContentA">
            <div class="wacFormRow">
                <div class="wacFormItemLeft">生产数量</div>
                <div class="wacFormItemRight">
                    <input name="goods_number" id="<?php echo $subItemModuleName ?>_goods_number" type="text" class="validate[required,custom[onlyNumber]] wacFormText ui-widget-content ui-corner-all" />
                </div>
                <div class="wacFormClear"></div>
            </div>
            <div class="wacFormRow">
                <div class="wacFormItemLeft">单价</div>
                <div class="wacFormItemRight">
                    <input name="goods_number_unit_price" id="<?php echo $subItemModuleName ?>_goods_number_unit_price" type="text" class="validate[required,custom[onlyCurrency]] wacFormText ui-widget-content ui-corner-all" />
                </div>
                <div class="wacFormClear"></div>
            </div>
            <div class="wacFormRow">
                <div class="wacFormItemLeft">加工费</div>
                <div class="wacFormItemRight">
                    <input name="processing_fee" id="<?php echo $subItemModuleName ?>_processing_fee" type="text" class="validate[required,custom[onlyCurrency]] wacFormText ui-widget-content ui-corner-all" />
                </div>
                <div class="wacFormClear"></div>
            </div>
            <div class="wacFormRow">
                <div class="wacFormItemLeft">批次</div>
                <div class="wacFormItemRight">
                    <input name="batch" id="<?php echo $subItemModuleName ?>_batch" type="text" class="validate[required,custom[noSpecialCaracters]] wacFormText ui-widget-content ui-corner-all" />
                </div>
                <div class="wacFormClear"></div>
            </div>
            
            <div class="wacFormRow">
                <div class="wacFormItemLeft">备注</div>
                <div class="wacFormItemRight">
                    <textarea name="memo" id="<?php echo $subItemModuleName ?>_memo" class="ui-widget-content ui-corner-all" cols="40" rows="4"></textarea></div>
                <div class="wacFormClear"></div>
            </div>
        </div>

    </div>

    <div class="wacFormClear"></div>
    <div class="wacFormBottom" align="center">

        <hr class="wacFormRuler" style="width:880px; float:inherit;" />
        <div id="<?php echo $subItemModuleName; ?>GoodsConsumeTabs">
            <ul>
                <li><a href="#<?php echo $subItemModuleName; ?>ConsumeTab">原料布消耗</a></li>
            </ul>
            <div id="<?php echo $subItemModuleName; ?>ConsumeTab" style="overflow: auto;">
                <FIELDSET class="<?php echo $subItemModuleName; ?>FormGoodsField1">
                    <LEGEND ACCESSKEY=O>原料布库存列表</LEGEND>
                    <div class="<?php echo $subItemModuleName; ?>FormGoodsCol" id="<?php echo $subItemModuleName; ?>_stockGoodsZone">
                        <ol id="<?php echo $subItemModuleName; ?>_stockGoodsList">
                        </ol>

                        <div id="<?php echo $subItemModuleName; ?>_stockGoodsListPageBtns" class="fg-buttonset fg-buttonset-single" style="display: none; font-size: 10px; margin-left:120px; margin-top:5px;">
                            <input type="button" id="<?php echo $subItemModuleName; ?>_btnPrevStockGoodsList" class="fg-button ui-state-default ui-priority-primary ui-corner-left" style="" value="上页">
                            <input type="button" id="<?php echo $subItemModuleName; ?>_btnNextStockGoodsList" class="fg-button ui-state-default ui-priority-primary ui-corner-right" style="" value="下页">
                        </div>


                    </div>
                </FIELDSET>
                <a id="<?php echo $subItemModuleName; ?>_btnTransferGoods" class="fg-button ui-state-default fg-button-icon-center ui-corner-all">
                    <span class="ui-icon ui-icon-arrowthick-1-e"></span>
                </a>
                <FIELDSET class="<?php echo $subItemModuleName; ?>FormGoodsField2">
                    <LEGEND ACCESSKEY=C>原料布消耗列表</LEGEND>
                    <div class="<?php echo $subItemModuleName; ?>FormGoodsCol" id="<?php echo $subItemModuleName; ?>_targetGoodsZone">
                        <ol id="<?php echo $subItemModuleName; ?>_targetGoodsList">
                        </ol>
                    </div>
                </FIELDSET>
            </div>
        </div>


        <div class="wacFormClear"></div>
        <p></p>
        <input name="btnSubmit" id="<?php echo $subItemModuleName ?>_btnSubmit" class="ui-button ui-state-default ui-corner-all wacCursor" type="button" value="提交" />
        &nbsp;&nbsp;
        <input name="btnClose" id="<?php echo $subItemModuleName ?>_btnClose" class="ui-button ui-state-default ui-corner-all wacCursor" type="button" value="关闭" />
    </div>

    <input type="hidden" name="id" id="<?php echo $subItemModuleName ?>_id" value="0">
    <input type="hidden" name="final_cloth_form_id" id="<?php echo $subItemModuleName ?>_final_cloth_form_id" value="0">
</form>
<!-- form, end-->
<?php echo "</div>"; ?>